import api from "@/util/api";

const cultivationMethodsApi = {
    findAll(pageNum, size, params = {}) {
        return api
            .get("/cultivationMethods", {
                //发送请求
                params: {
                    pageNum,
                    size,
                    ...params,
                },
            })
            .then((resp) => resp.data);
    },
    removeAll(ids) {
        return api.delete("/cultivationMethods", { data: ids }).then((resp) => resp.data);
    },
    save(cultivationMethods) {
        return api.post("/cultivationMethods", cultivationMethods).then((resp) => resp.data);
    },
    update(cultivationMethods) {
        return api.put("/cultivationMethods", cultivationMethods).then((resp) => resp.data);
    }
};

export default cultivationMethodsApi;
